package de.jmda.gen.java;

import javax.validation.constraints.NotNull;

import de.jmda.gen.CompoundGenerator;
import de.jmda.gen.GeneratorException;

/**
 * Generator for technical type declarations like <code>class C {}</code>.
 *
 * @author roger.jmda@gmail.com
 */
public interface DeclaredTypeGenerator
		extends CompoundGenerator, DeclaredElementGenerator
{
	TypeModifiersGenerator getModifiersGenerator();
	@NotNull TypeKindGenerator getTypeKindGenerator();
	@NotNull TypeNameGenerator getTypeNameGenerator();
	TypeParameterListGenerator getTypeParameterListGenerator();
	ExtendsClauseGenerator getExtendsClauseGenerator();
	ImplementsClauseGenerator getImplementsClauseGenerator();
	@NotNull TypeBodyGenerator getTypeBodyGenerator();
	
	void setModifiersGenerator(TypeModifiersGenerator generator);
	void setTypeKindGenerator(@NotNull TypeKindGenerator generator);
	void setTypeNameGenerator(@NotNull TypeNameGenerator generator);
	void setTypeParameterListGenerator(TypeParameterListGenerator generator);
	void setExtendsClauseGenerator(ExtendsClauseGenerator generator);
	void setImplementsClauseGenerator(ImplementsClauseGenerator generator);
	void setTypeBodyGenerator(@NotNull TypeBodyGenerator generator);
	
	/**
	 * @NotNull
	 * @return
	 */
	TypeModifiersGenerator demandModifiersGenerator();
	/**
	 * @NotNull
	 * @return
	 */
	TypeParameterListGenerator demandTypeParameterListGenerator();
	/**
	 * @NotNull
	 * @return
	 */
	ExtendsClauseGenerator demandExtendsClauseGenerator();
	/**
	 * @NotNull
	 * @return
	 */
	ImplementsClauseGenerator demandImplementsClauseGenerator();

	void setTypeName(@NotNull String typeName);
	@NotNull String getTypeName() throws GeneratorException;
}